home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / imap / ANSI / c-client / tcp_vmsn.c < prev    next >
Text File  |  1995-09-09  |  4KB  |  209 lines

  1. /*
  2.  * Program:    Dummy VMS TCP/IP routines for non-TCP/IP systems
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    2 August 1994
  13.  * Last Edited:    8 September 1995
  14.  *
  15.  * Copyright 1995 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.    This software is made available
  24.  * "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. /* TCP/IP manipulate parameters
  37.  * Accepts: function code
  38.  *        function-dependent value
  39.  * Returns: function-dependent return value
  40.  */
  41.  
  42. void *tcp_parameters (long function,void *value)
  43. {
  44.   return NIL;
  45. }
  46.  
  47.  
  48. /* TCP/IP open
  49.  * Accepts: host name
  50.  *        contact service name
  51.  *        contact port number
  52.  * Returns: TCP/IP stream if success else NIL
  53.  */
  54.  
  55. TCPSTREAM *tcp_open (char *host,char *service,long port)
  56. {
  57.   char tmp[MAILTMPLEN];
  58.   if (port) sprintf (tmp,"Can't connect to %.80s,%d: no TCP",host,port);
  59.   else sprintf (tmp,"Can't connect to %.80s,%s: no TCP",host,service);
  60.   mm_log (tmp,ERROR);
  61.   return NIL;
  62. }
  63.  
  64.  
  65. /* TCP/IP authenticated open
  66.  * Accepts: host name
  67.  *        service name
  68.  *        returned user name
  69.  * Returns: TCP/IP stream if success else NIL
  70.  */
  71.  
  72. TCPSTREAM *tcp_aopen (char *host,char *service,char *usrnam)
  73. {
  74.   return NIL;
  75. }
  76.  
  77. /* TCP/IP receive line
  78.  * Accepts: TCP/IP stream
  79.  * Returns: text line string or NIL if failure
  80.  */
  81.  
  82. char *tcp_getline (TCPSTREAM *stream)
  83. {
  84.   return NIL;
  85. }
  86.  
  87.  
  88. /* TCP/IP receive buffer
  89.  * Accepts: TCP/IP stream
  90.  *        size in bytes
  91.  *        buffer to read into
  92.  * Returns: T if success, NIL otherwise
  93.  */
  94.  
  95. long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer)
  96. {
  97.   return NIL;
  98. }
  99.  
  100.  
  101. /* TCP/IP receive data
  102.  * Accepts: TCP/IP stream
  103.  * Returns: T if success, NIL otherwise
  104.  */
  105.  
  106. long tcp_getdata (TCPSTREAM *stream)
  107. {
  108.   return NIL;
  109. }
  110.  
  111. /* TCP/IP send string as record
  112.  * Accepts: TCP/IP stream
  113.  *        string pointer
  114.  * Returns: T if success else NIL
  115.  */
  116.  
  117. long tcp_soutr (TCPSTREAM *stream,char *string)
  118. {
  119.   return NIL;
  120. }
  121.  
  122.  
  123. /* TCP/IP send string
  124.  * Accepts: TCP/IP stream
  125.  *        string pointer
  126.  *        byte count
  127.  * Returns: T if success else NIL
  128.  */
  129.  
  130. long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size)
  131. {
  132.   return NIL;
  133. }
  134.  
  135.  
  136. /* TCP/IP close
  137.  * Accepts: TCP/IP stream
  138.  */
  139.  
  140. void tcp_close (TCPSTREAM *stream)
  141. {
  142. }
  143.  
  144.  
  145. /* TCP/IP abort stream
  146.  * Accepts: TCP/IP stream
  147.  * Returns: NIL always
  148.  */
  149.  
  150. long tcp_abort (TCPSTREAM *stream)
  151. {
  152.   return NIL;
  153. }
  154.  
  155. /* TCP/IP get host name
  156.  * Accepts: TCP/IP stream
  157.  * Returns: host name for this stream
  158.  */
  159.  
  160. char *tcp_host (TCPSTREAM *stream)
  161. {
  162.   return NIL;
  163. }
  164.  
  165.  
  166. /* TCP/IP get local host name
  167.  * Accepts: TCP/IP stream
  168.  * Returns: local host name
  169.  */
  170.  
  171. char *tcp_localhost (TCPSTREAM *stream)
  172. {
  173.   return NIL;
  174. }
  175.  
  176.  
  177. /* TCP/IP return port for this stream
  178.  * Accepts: TCP/IP stream
  179.  * Returns: port number for this stream
  180.  */
  181.  
  182. long tcp_port (TCPSTREAM *stream)
  183. {
  184.   return 0xffffffff;        /* return port number */
  185. }
  186.  
  187.  
  188. /* TCP/IP get server host name
  189.  * Accepts: pointer to destination
  190.  * Returns: string pointer if got results, else NIL
  191.  */
  192.  
  193. char *tcp_clienthost (char *dst)
  194. {
  195.   return "UNKNOWN";
  196. }
  197.  
  198.  
  199. /* Return my local host name
  200.  * Returns: my local host name
  201.  */
  202.  
  203. char *mylocalhost ()
  204. {
  205.                 /* have local host yet? */
  206.   if (!myLocalHost) myLocalHost = cpystr (getenv ("SYS$NODE"));
  207.   return myLocalHost;
  208. }
  209.